/**
 * Copyright 2018 asiainfo Inc.
 **/
package com.myz.rabbitmqspring.spring.event.service;

import java.io.IOException;

/**
 * 发送和接受这个消息持有对象，一个用来序列化和反序列化的工厂
 *
 * @author maoyz on 2018/8/28
 * @version: v1.0
 */
public interface CodecFactory {

    /**
     * 序列化对象
     */
    byte[] serialize(Object obj) throws IOException;

    /**
     * 反序列化对象
     */
    Object deSerialize(byte[] in) throws IOException;

}
